<div class="row-fluid">
	<div class="span12">
		<div class="widget-box">
			<div class="widget-title">
				<span class="icon"> <i class="icon-info-sign"></i></span>
				<h5>物流详情</h5>
			</div>
			<div class="widget-content nopadding">
				<form novalidate="novalidate" id="basic_validate" name="basic_validate" action="#" method="post" class="form-horizontal">
					<div class="widget-content nopadding">
		            	<table id="logistics_result"  page_index="1" class="table table-bordered table-striped wi_tree_gird">
						<!-- 标题层 -->
		              		<thead>
				                <tr>
				                  <th style="width: 10px;">&nbsp;</th>
				                  <th>系统单据号</th>
				                  <th>运单号</th>
				                  <th>系统跟踪号</th>
				                  <th>承运人</th>
				                  <th>取货时间</th>
				                  <th>运输时间</th>
				                  <th>状态</th>
				                </tr>
				            <!--     <tr>
				                  <th>产品编码</th>
				                  <th>产品名称</th>
				                  <th>单位</th>
				                  <th>数量</th>
				                  <th colspan="2">&nbsp;</th>
				                </tr> -->
			              	</thead>
			              	<tbody>
			              		<empty name="logistics_info">
			              			<tr class="empty-data"><td colspan="8">暂无OTMS配送信息</td><tr/>
		              			<else />
		              	        	<volist name="logistics_info" id="lgs_list">
							            <tr>
							            	<td class="wi_switch s-open" onclick="OtmsLogistics.Switch(this,'{$lgs_list.id}')">
							            		<if condition="$lgs_list.second_size gt 0">
													<span  class="open-switch" >[&nbsp;+&nbsp;]</span>
													<span  class="close-switch">[&nbsp;-&nbsp;]</span>
												<else />
													&nbsp;
												</if>
											</td>
							            	<td>{$lgs_list.order_no}</td>
							            	<td>{$lgs_list.trans_no}</td>
							            	<td>{$lgs_list.trakker_no}</td>
							            	<td>{$lgs_list.carrier_code}</td>
							            	<td>{$lgs_list.pickup_date}</td>
							            	<td>{$lgs_list.delivery_date}</td>
							            	<td>{$lgs_list.trans_status_cn}</td>
							            </tr>
							            <if condition="$lgs_list.second_size gt 0">
							            	<if condition="$lgs_list.sku_size gt 0">
								            	<!-- 产品信息 -->
								            	<tr name="{$lgs_list.id}" class="children_title">
								            		<td>&nbsp;</td>
								            		<td colspan="7" class="title">产品信息</td>
							            		</tr>
								            	<volist name="lgs_list['sku_list']" id="lgs_sku_lst">
									            	<tr name="{$lgs_list.id}" class="children_row" >
								            		 	<td>&nbsp;</td>
								            		 	<td colspan="7">
								            		 		<ul>
								            		 			<li>编码:{$lgs_sku_lst.product_code} 名称:{$lgs_sku_lst.product_name} 单位:{$lgs_sku_lst.unit_type_cn} 数量:{$lgs_sku_lst.quantity}</li>
								            		 		</ul>
										            	</td>
									            	 </tr>
								            	 </volist>
							            	 </if>
							            	 <!-- 运单事件 -->
						            	    <if condition="$lgs_list.event_size gt 0">
								            	 <tr name="{$lgs_list.id}" class="children_title">
								            	 	<td>&nbsp;</td>
							            	 		<td colspan="7" class="title">事件信息</td>
						            	 		</tr>
							            	 	<volist name="lgs_list['event_list']" id="lgs_event_lst">
									            	 <tr name="{$lgs_list.id}" class="children_row" >
									            		 	<td>&nbsp;</td>
									            		 	<td colspan="7">
									            		 		<ul>
									            		 		<li>类型:{$lgs_event_lst.event_type_cn} 时间:{$lgs_event_lst.event_time} 备注:{$lgs_event_lst.remark}</li>
												            	<li>文件:
												            		<volist name="lgs_event_lst['file_lst']" id="file_list">
												            			<img src="{$file_list}">
												            		</volist>
											            		</li>
									            		 		</ul>
									            		 	</td>
									            		 </tr>
									            </volist>
							              	</if>
							            </if>
									</volist>
		              			</empty>
			              	</tbody>
	            		</table>
	          		</div>
				</form>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	OtmsLogistics = {
		'Switch' : function(obj,tag){
			var isClose = $(obj).hasClass('s-close')?true:false;
			if(isClose){
				OtmsLogistics.Show(obj,tag);
			}else{
				OtmsLogistics.Hide(obj,tag);
			}
		},
		'Show' : function(obj,tag){
			$(obj).removeClass('s-close');
			$(obj).addClass('s-open');
			var tr = $("tr[name='"+tag+"'");
			tr.show('normal');
		},
		'Hide' : function(obj,tag){
			$(obj).removeClass('s-open');
			$(obj).addClass('s-close');
			var tr = $("tr[name='"+tag+"'");
			tr.hide('normal');
		},
		'ConvertOptions': function(type,obj){
			var display = '【转换失败:'+obj+'】';
			$.each(WareInfoPage[type], function(key, value){
			  if(key == obj){
				  display = value;
				  return false;
			  }
			});
			return display;
		}
	};	 
</script>